// 引入Service和请求头ServiceName
import { Service, ServiceName } from '@/network/http.js'
import store from '@/store/index.js' // 引入store

const api = {
  /**
   * 新增
   */
  insert (params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/tBusDryOrder/insert`,params
    )
  },
  /**
   * 主列表
   */
  listPages (params) {
    return Service.get(
      `/${ServiceName}/api/external/tBusDryOrder/queryall`,{params}
    )
  },
  /**
   * 更新
   */
  updatebyid (params) {
    store.commit('changeStatus', true)
    return Service.put(
      `/${ServiceName}/api/external/tBusDryOrder/updatebyid`,params
    )
  },
  /**
   * 删除
   */
  deleteById (params) {
    return Service.delete(
      `/${ServiceName}/api/external/tBusDryOrder/deleteById?id=${params}`
    )
  },
  /**
   * 修改状态
   */
  updatestatus (params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/tBusDryOrder/updatestatus?id=${params}`
    )
  },
}
export default api